home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #6
/
Amiga Plus CD - 2004 - No. 06.iso
/
AmigaPlus
/
Begleitmaterial
/
amiganews
/
Anzeige_Browser
/
AWeb_APL_060
/
Plugins
/
awebgif
/
awebgif.awebrx
< prev
next >
Wrap
Text File
|
2003-03-28
|
6KB
|
167 lines
/* awebgif.awebrx - Install or uninstall the AWeb GIF plugin */
options results
if left(address(),5)~="AWEB." then do
ports=show("P")
parse var ports dummy "AWEB." portnr .
if portnr="" then do
address command "run AWeb_APL:AWeb"
address command "WaitForPort AWEB.1"
portnr=1
end
address value "AWEB."portnr
'get activeport'
address value result
end
parse arg args
parse source dummy1 dummy2 called .
i=lastpos(called,'/')
if i==0 then i=lastpos(called,':')
if i>0 then path=left(called,i)
else path=''
if args='' then do
if ~open(tf,"T:awebgifsetup.html","W") then exit
call writeln tf,"<html><head><title>AWeb GIF Setup</title></head>"
call writeln tf,"<body><h1>AWeb GIF Setup</h1>"
if exists("AWebPath:awebplugin/awebgif.awebplugin") then do
installed=0
progress=4
loops=-1
lowpri=0
'getcfg MIME stem m'
do i=1 to m.0
if upper(left(m.i.value,10))="IMAGE/GIF;" then do
parse var m.i.value type ";" ext ";" action ";" file ";" args
if action='A' & upper(right(file,18))="AWEBGIF.AWEBPLUGIN" then do
installed=1
j=index(upper(args),"PROGRESS=")
if j>0 then do
progress=substr(args,j+9)
j=verify(progress,"0123456789")
if j>0 then progress=left(progress,j-1)
end
j=index(upper(args),"LOOPS=")
if j>0 then do
loops=substr(args,j+6)
j=verify(loops,"-0123456789")
if j>0 then loops=left(loops,j-1)
end
if index(upper(args),"ANIMATE=0") then loops=0
lowpri=(index(upper(args),"LOWPRI")>0)
end
leave
end
end
call writeln tf,"<table border width=100% bgcolor=#aaccaa><tr><td>"
call writeln tf,"<form action='x-aweb:rexx/"called"'>"
call writeln tf,"This form configures AWeb to use the <strong> AWeb GIF plugin</strong>."
call writeln tf,"<input type=hidden name=defprogress value="progress">"
call writeln tf,"<input type=hidden name=defloops value="loops">"
call writeln tf,"<ol><li>Select the required modes of operation "
call writeln tf,"(see <a href='file:///AWebPath:awebplugin/docs/awebgif.html#parameters'>documentation</a> for details)"
call writeln tf,"<p><ul><li>Progressive display:<br>"
call writeln tf,"<input type=radio name=progress value=0"
if progress=0 then call writeln tf," checked"
call writeln tf,"> No progressive display (fastest)<br>"
call writeln tf,"<input type=radio name=progress value=4"
if progress=4 then call writeln tf," checked"
call writeln tf,"> Standard progressive display<br>"
call writeln tf,"<input type=radio name=progress value=1"
if progress=1 then call writeln tf," checked"
call writeln tf,"> Smooth progressive display (slowest)<br>"
call writeln tf,"<p><li>Animation playback:<br>"
call writeln tf,"<input type=radio name=loops value=-1"
if loops=-1 then call writeln tf," checked"
call writeln tf,"> Play back animations infinitely<br>"
call writeln tf,"<input type=radio name=loops value=3"
if loops=3 then call writeln tf," checked"
call writeln tf,"> Play back animations only 3 times<br>"
call writeln tf,"<input type=radio name=loops value=0"
if loops=0 then call writeln tf," checked"
call writeln tf,"> No animations (faster and needs less memory)<br>"
call writeln tf,"<p><li>Multitasking:<br>"
call writeln tf,"<input type=checkbox name=lowpri value='LOWPRI'"
if lowpri then call writeln tf," checked"
call writeln tf,"> Run decoder at low priority<br>"
call writeln tf,"</ul>"
call writeln tf,"<p><li><input type=checkbox name=save value=yes checked> Save the new settings"
call writeln tf,"<p><li><input type=submit value='Install AWeb GIF plugin'>"
call writeln tf,"</ol></form></table>"
if installed>0 then do
call writeln tf,"<p><table border width=100% bgcolor=#ccaaaa><tr><td>"
call writeln tf,"<form action='x-aweb:rexx/"called"'>"
call writeln tf,"<input type=hidden name=deinstall value=''>"
call writeln tf,"This form will deinstall the AWeb GIF plugin and reset the default (datatypes) decoder for GIF images."
call writeln tf,"<ol><li><input type=checkbox name=save value=yes checked> Save the new settings"
call writeln tf,"<p><li><input type=submit value='De-install AWeb GIF plugin'>"
call writeln tf,"</ol></form></table>"
end
end
else do
call writeln tf,"Plugin file not found. You have to run the install script first."
end
call writeln tf,"<p><hr><p><a href='file:///AWebPath:awebplugin/docs/awebgif.html'>Back to documentation</a>"
call close tf
'open "file:///T:awebgifsetup.html" reload'
'wait "file:///T:awebgifsetup.html"'
'allowcmd'
address command 'delete T:awebgifsetup.html quiet'
end
else do
ext="gif"
rest=";"
'getcfg MIME stem m'
do i=1 to m.0
if upper(left(m.i.value,10))="IMAGE/GIF;" then do
parse var m.i.value type ";" ext ";" action ";" rest
leave
end
end
if upper(left(args,9))="DEINSTALL" then do
mime="IMAGE/GIF;"ext";;"rest
end
else do
progress=""
defprogress="4"
loops=""
defloops="-1"
lowpri=""
save=""
do while args~=""
parse var args nextarg args
interpret nextarg
end
if progress="" then progress=defprogress
if loops="" then loops=defloops
mime="IMAGE/GIF;"ext";A;AWebPath:awebplugin/awebgif.awebplugin;PROGRESS="progress" LOOPS="loops lowpri
end
'setcfg MIME "'mime'" ADD'
if upper(save)="YES" then do
'savesettings'
end
'open "file:///AWebPath:awebplugin/docs/awebgif.html"'
end
exit